package com.fenxiangle.yueding.feature.mine.view.adapter;

import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.fenxiangle.yueding.R;
import com.fenxiangle.yueding.entity.bo.CouponBo;
import com.suozhang.framework.framework.AM;

import java.util.List;

public class CouponAdpter extends BaseQuickAdapter<CouponBo, BaseViewHolder> {
    private int type;

    public CouponAdpter(int type) {
        super(R.layout.item_coupon);
        this.type = type;
    }

    @Override
    protected void convert(BaseViewHolder helper, CouponBo item) {
        helper.setVisible(R.id.btn_coupon_use, type == 0 ? true : false)
//                .setText()
//                .setBackgroundRes(R.id.view_coupon_bg, type == 0 ? R.drawable.bg_user_coupon : R.drawable.bg_user_coupon_used)
                .setBackgroundColor(R.id.line_coupon, type == 0 ? AM.res().getColor(R.color.color_c6dcec) : AM.res().getColor(R.color.bg_normal2))
                .addOnClickListener(R.id.btn_coupon_use);


    }
}
